from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep

driver = webdriver.Edge()
driver.get('https://passport.ctrip.com/user/login')
driver.maximize_window()
sleep(2)
driver.find_element(By.XPATH,'//*[@id="bbz_accounts_pc_lg_box"]/div/div/div[1]/div[4]/div/div[1]/label').click()
sleep(1)
driver.find_element(By.XPATH,'//*[@id="bbz_accounts_pc_lg_box"]/div/div/div[1]/div[6]/div[2]/a[2]').click()
sleep(3)
# 切换页面
driver.switch_to.window(driver.window_handles[-1])
driver.switch_to.frame(driver.find_element(By.ID,'ptlogin_iframe'))
driver.find_element(By.ID,'img_out_1847537889').click()

sleep(10)